
<HTML>
<TITLE>MITZA SEARC ENGINE</TITLE>
<BODY>

<div align='center'>
<table cellpadding="5" cellspacing="1" >
<tr>
<td align="center">
<form action="index.php" method="get">

<table><tr><td>
<div align="left">
<input type="text" name="w" id="w" size="40"
value="<?php echo (isset($_GET["w"]) ? $_GET["w"] : "") ?>" action="include/js_suggest/suggest.php" columns="2" autocomplete="off" delay="1500">
</div>
<td>
<input type="submit" value="Search...">
</td>
</tr>
</table>
</div>

<?php
require_once("include/@config.php");
require_once("include/ws.php");
require_once("include/ex.php");
require_once("include/mw.php");
require_once("include/ads.php");

function main()
{
    global $_PAGE;
    $s=isset($_GET["s"]) ? $_GET["s"] : 0; // web site only
    $k=isset($_GET["k"]) ? $_GET["k"] : 0; // category
    $n=isset($_GET["n"]) ? $_GET["n"] : $_PAGE; // per page, n-count
    $f=isset($_GET["f"]) ? $_GET["f"] : 0; // from
    $ww=isset($_GET["w"]) ? $_GET["w"] : ""; //word

    $np = $f;
    $tp = $f;
    $w = config_prep($ww);


    if(strlen($w))
    {
        $np=ex($w, $f, $n, $k, $s);
    }
    else
    {
        ads();
    }

    if($np != $f)
    {

        if($np>$n)
        {
            $x=$f-$n;
            echo ("<a href='index.php?w={$ww}&f={$x}&n={$n}&s=$s'><<-Prev</a> ");
        }
        else
        {
            echo ("X<-Prev ");
        }
        if($tp+$_PAGE==$np)
            echo ("<a href='index.php?w={$ww}&f={$np}&n={$n}&s=$s'>Next->></a> ");
        else
            echo ("Next->X");
    }

}


main();

?>

</BODY>
</HTML>
